#!/bin/sh

CUR_PATH=$(cd "$(dirname "$0")"; pwd)
source ${CUR_PATH}/kudu_server.conf

impala-shell -i ${IMPALA_HOST} -q "CREATE DATABASE IF NOT EXISTS ${KUDU_DATABASE};"
if [ $? -ne 0 ] ; then
    echo "KUDU数据库${KUDU_DATABASE}创建失败..."
else
    echo "KUDU数据库${KUDU_DATABASE}创建成功..."
fi

#普通分区表
for script in `ls ${CUR_PATH}/partition_table/*.sh`
do
    . ${script}
done

